/************************************************************************
Author:				Trey Turley, Thomas Lee, Marc Willis

Filename:			Draw.h

Classname:			Plotter

Description:		The plotter class allows us to plot characters or
					blocks to the screen. It uses a coordinate system to
					determine where the char/block will be placed.

Date Modified:		8/7/10
					- File finalized
					8/3/10
					- File created
*************************************************************************/


#ifndef DRAW_H
#define DRAW_H
#include <windows.h>
#include <mmsystem.h>
#include <conio.h>
#include <string>



const char SQUARE = 219;
const char LEFT   = 17;
const char RIGHT  = 16;
const char UP    = 30;
const char DOWN = 31;
const char BLANK  = 32;
const char DEAD = 177;


//const ints for the colors
const int	black   = 0x00, darkblue = 0x01, darkgreen  = 0x02, darkcyan  = 0x03,
			darkred = 0x04, purple   = 0x05, darkyellow = 0x06, lightgrey = 0x07, 
			grey    = 0x08, blue     = 0x09, green      = 0x0A, cyan      = 0x0B, 
			red     = 0x0C, magenta  = 0x0D, yellow     = 0x0E, white     = 0x0F;

class Plotter
{
    protected:
       COORD  coordScreen;
       HANDLE hConsoleOutput;
       char   dummy;
       void cls( HANDLE hConsole );
    public:

/************************************************************************
 Name:			Plotter()

 Description:	Defualt Constructor

 Input:
 (None)

 Output:
 (None)
*************************************************************************/
       Plotter();
/************************************************************************
 Name:			clear()

 Description:	Removes ALL plotted chars from the screen.

 Input:
 (None)

 Output:
 (None)
*************************************************************************/
       void clear();

/************************************************************************
 Name:			move(int x, int y)

 Description:	Moves the cursor to the specified (X,Y) location.

 Input:

 int x		-	The x coordinate on the (X,Y) grid

 int y		-	The Y coordinate on the (X,Y) grid

 Output:
 (None)
*************************************************************************/
       void move(int, int);

/************************************************************************
 Name:			plot(int , int , char )

 Description:	Plots a character on the screen at the (X,Y) location.

 Input:

 int x		-	The x coordinate on the (X,Y) grid

 int y		-	The Y coordinate on the (X,Y) grid

 char c		-	The character to be placed on the screen

 Output:
 (None)
*************************************************************************/
       void plot(int,int,char);

/************************************************************************
 Name:			setColor(int )

 Description:	Allows a specific color to be set for a Plotter object.

 Input:

 int c		-	The color to be set

 Output:
 (None)
*************************************************************************/
       void setColor(int);

/************************************************************************
 Name:			plotTrail(int x,int y,int color)

 Description:	Used to plot a player's trail.

 Input:
 
 int x		-	The x coordinate on the (X,Y) grid

 int y		-	The Y coordinate on the (X,Y) grid

 int color	-	The color of the trail

 int dir	-	The direction of travel

 Output:
 (None)
*************************************************************************/
	   void plotTrail(int,int,int,int dir);

/************************************************************************
 Name:			void drawMap(int, int)

 Description:	Used to draw the default map.

 Input:
 
 int x		-	The width of the map

 int y		-	The height of the map 

 Output:
 (None)
*************************************************************************/
	   void drawMap(int x=79,int y=40);

};


#endif /*DRAW_H*/
